<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>表单</title>
    <link rel="stylesheet" href="../frame/layui/css/layui.css">
    <link rel="stylesheet" href="../frame/static/css/style.css">
    <link rel="icon" href="../frame/static/image/code.png">
</head>
<body class="body">
	<form class="layui-form" action="../goods/addGoods.action" method="post">
	    <div class="layui-form-item">
	        <label class="layui-form-label">商品编号</label>
	        <div class="layui-input-block">
	            <input type="text" name="goodsNumber" lay-verify="title" autocomplete="off" class="layui-input">
	        </div>
	    </div>
	    <div class="layui-form-item">
	        <label class="layui-form-label">商品名字</label>
	        <div class="layui-input-block">
	            <input type="text" name="goodsName" lay-verify="title" autocomplete="off" class="layui-input">
	        </div>
	    </div>
	    <div class="layui-form-item">
	        <div class="layui-inline">
	            <label class="layui-form-label">商品价格</label>
	            <div class="layui-input-inline" style="width: 100px;">
	                <input type="text" name="goodsPrice" placeholder="￥" autocomplete="off" class="layui-input">
	            </div>
	        </div>
	    </div>
	    <div class="layui-form-item">
	        <label class="layui-form-label">商品数量</label>
	        <div class="layui-input-block">
	            <input type="text" name="number" lay-verify="title" autocomplete="off" class="layui-input">
	        </div>
	    </div>
	    <div class="layui-form-item">
	        <div class="layui-inline">
	            <label class="layui-form-label">创建日期</label>
	            <div class="layui-input-block">
	                <input type="text" name="creatTime" id="date1" autocomplete="off" class="layui-input">
	            </div>
	        </div>
	    </div>
	    <div class="layui-form-item layui-form-text">
	        <label class="layui-form-label">商品描述</label>
	        <div class="layui-input-block">
	            <textarea placeholder="请输入内容" class="layui-textarea" name="goodsIntroduce"></textarea>
	        </div>
	    </div>
	    <div class="layui-form-item">
	        <div class="layui-input-block">
	            <button class="layui-btn" lay-submit="" lay-filter="demo1">立即提交</button>
	            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
	        </div>
	    </div>
	</form>
	<script src="../frame/layui/layui.js" charset="utf-8"></script>
	<script>
	    layui.use(['form', 'layedit', 'laydate'], function(){
	        var form = layui.form
	                ,layer = layui.layer
	                ,layedit = layui.layedit
	                ,laydate = layui.laydate;
	
	        //日期
	        laydate.render({
	            elem: '#date'
	        });
	        laydate.render({
	            elem: '#date1'
	        });
	
	        //创建一个编辑器
	        var editIndex = layedit.build('LAY_demo_editor');
	
	        //监听指定开关
	        form.on('switch(switchTest)', function(data){
	            layer.msg('开关checked：'+ (this.checked ? 'true' : 'false'), {
	                offset: '6px'
	            });
	            layer.tips('温馨提示：请注意开关状态的文字可以随意定义，而不仅仅是ON|OFF', data.othis)
	        });
	
	    });
	</script>
</body>
</html>